﻿@{
    ViewBag.Title = "Detail";
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>丁丁图书商城-商品详情</title>
    <link href="~/css/main.css" rel="stylesheet" />
    <link href="~/css/reset.css" rel="stylesheet" />
    <style type="text/css">
        * {
            margin: 0px;
            padding: 0px;
        }

        .header div, .header div a {
            font-weight: bold;
        }
    </style>
</head>
<body style="background:url(/img/背景.jpg)  no-repeat fixed center;background-size:100%;">
    <div class="header_con">
        <div class="header">
            <div class="welcome fl">欢迎来到丁丁图书商城</div>
            <div class="fr">
                <div class="login_btn fl">
                    @if (Session["username"] == null)
                    {
                        <a href="/Login/Login">登录</a>
                        <a href="/Login/Register">注册</a>
                    }
                    else
                    {
                        if ((int)Session["usertype"] == 1)
                        {
                        <a href="/Info/Info">欢迎您： @Session["username"]</a>
                        }
                        else
                        {
                        <a href="/Admin/Home">欢迎您： @Session["username"]</a>
                        }
                        <a href="/Login/Login">重新登录</a>
                    }
                </div>
                <div class="user_link fl">
                    <span>|</span>
                    <a href="/Info/Info">用户中心</a>
                    <span>|</span>
                    <a href="/Cart/Cart">我的购物车</a>
                    <span>|</span>
                    <a href="user_center_order.html">我的订单</a>
                </div>
            </div>
        </div>
    </div>

    <div class="search_bar clearfix">
        <a href="/Home/Index" class="logo fl">

            <img src="~/images/logo.png"></a>
        <div class="search_con fl">
            <form method="post" action="/List/List">
                <input type="text" name="sou" class="input_text fl" id="txtSearch"style="background:none;" name=""  placeholder="搜索商品" />
                <input type="submit" value="搜索" class="input_btn fr" />
            </form>
        </div>
        <div class="guest_cart fr">
            <a href="/Cart/Cart" class="cart_name fl">我的购物车</a>
            
        </div>
    </div>

    <div class="navbar_con">
        @*<div class="navbar clearfix">
            <div class="subnav_con fl">
                <h1>全部商品分类</h1>
                <span></span>
                <ul class="subnav">
                    <li><a href="#" class="fruit">新鲜水果</a></li>
                    <li><a href="#" class="seafood">海鲜水产</a></li>
                    <li><a href="#" class="meet">猪牛羊肉</a></li>
                    <li><a href="#" class="egg">禽类蛋品</a></li>
                    <li><a href="#" class="vegetables">新鲜蔬菜</a></li>
                    <li><a href="#" class="ice">速冻食品</a></li>
                </ul>
            </div>
            <ul class="navlist fl">
                <li><a href="">首页</a></li>
                <li class="interval">|</li>
                <li><a href="">手机生鲜</a></li>
                <li class="interval">|</li>
                <li><a href="">抽奖</a></li>
            </ul>
        </div>*@
    </div>

    <div class="breadcrumb">
        <a href="/Home/Index">主页</a>
        <span>></span>

        <a href="#">商品详情</a>
    </div>

    <div class="goods_detail_con clearfix">
        <div class="goods_detail_pic fl">
            <img src="/img/@ViewBag.book.Pic" style="width:320px;height:300px;">
        </div>

        <div class="goods_detail_list fr">
            <h3 style="font-weight: bold;">@ViewBag.book.bookname</h3>
            <p style="font-size: 14px;">@ViewBag.book.Introduced</p>
            <div class="prize_bar">
                <span class="show_pirze">¥<em>@ViewBag.book.Price</em></span>
                <span class="show_unit">@ViewBag.book.Press</span>
            </div>
            <div class="operate_btn">
                <a href="/Detail/shou/@ViewBag.book.ID" class="buy_btn" style="border:1px solid orange;">添加收藏</a>
                <a href="/Cart/Car/@ViewBag.book.ID" class="add_cart" id="add_cart" style="background-color:#37ab40;border:1px solid orange;">加入购物车</a>
            </div>
        </div>
    </div>

    <div class="main_wrap clearfix">
        <div class="l_wrap fl clearfix">
            <div class="new_goods">
                <h3>新品推荐</h3>
                <ul>
                    <li>
                        <a href="/Detail/Detail/@ViewBag.b.ID">
                            <img src="~/img/@ViewBag.b.Pic"/></a>
                        <h4><a href="/Detail/Detail/@ViewBag.b.ID">@ViewBag.b.bookname</a></h4>
                        <div class="prize">¥ @ViewBag.b.Price</div>
                    </li>
                </ul>
            </div>
        </div>

        <div class="r_wrap fr clearfix">
            <ul class="detail_tab clearfix">
                <li class="active">评论</li>
            </ul>
            <div class="tab_content">
                @foreach (var a in ViewBag.pings)
                {
                    <dl style="margin-top:20px;background:#f7ebf7;">
                        <dt>
                            <img src="~/img/@a.pic" style="width:30px;height:30px;"/>
                            <a href="#" style="color: red; font-size: 20px;">@a.username:</a>
                        </dt>
                        <dd><span style="margin-left:50px;">@a.ping</span><span style="float:right;">@a.dt</span></dd>
                    </dl>
                }
                <div class="search_con fl" style="border: none; background: none;">
                    <form method="post" action="/Detail/ping/?book=@ViewBag.book.ID">
                        <input type="text" name="ping" class="input_text fl" style="border: 1px solid green;" />
                        <input type="submit" value="评论" class="input_btn fr" />
                    </form>
                </div>
            </div>

        </div>
    </div>

    <div class="footer">
        <div class="foot_link">
            <a href="#">关于我们</a>
            <span>|</span>
            <a href="#">联系我们</a>
            <span>|</span>
            <a href="#">招聘人才</a>
            <span>|</span>
            <a href="#">友情链接</a>
        </div>
        <p>CopyRight © 2016 北京天天生鲜信息技术有限公司 All Rights Reserved</p>
        <p>电话：010-****888    京ICP备*******8号</p>
    </div>
    <div class="add_jump"></div>

    @*	<script type="text/javascript" src="js/jquery-1.12.2.js"></script>
	<script type="text/javascript">
		var $add_x = $('#add_cart').offset().top;
		var $add_y = $('#add_cart').offset().left;

		var $to_x = $('#show_count').offset().top;
		var $to_y = $('#show_count').offset().left;

		$(".add_jump").css({'left':$add_y+80,'top':$add_x+10,'display':'block'})
		$('#add_cart').click(function(){
			$(".add_jump").stop().animate({
				'left': $to_y+7,
				'top': $to_x+7},
				"fast", function() {
					$(".add_jump").fadeOut('fast',function(){
						$('#show_count').html(2);
					});

			});
		})
	</script>
	*@
</body>
</html>
